﻿<%@ Page Language="C#" MasterPageFile="~/Shared/EOS.master" AutoEventWireup="True"
    Inherits="EOSCRM.Web.Forms.DanhMuc.Lo" CodeBehind="Lo.aspx.cs" %>

<%@ Import Namespace="EOSCRM.Web.Common"%>
<%@ Register Assembly="EOSCRM.Controls" Namespace="EOSCRM.Controls" TagPrefix="eoscrm" %>

<asp:Content ID="head" ContentPlaceHolderID="headCPH" runat="server">    
    <script type="text/javascript">
    </script>
    <style type="text/css">
        .style2
        {
            width: 252px;
        }
        .style3
        {
            width: 244px;
        }
    </style>
</asp:Content>

<asp:Content ID="content" ContentPlaceHolderID="mainCPH" runat="server">    
    <asp:UpdatePanel ID="upnlInfor" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer">
                <table class="crmtable">
                    <tbody>
                        <tr>    
                            <td class="crmcell right">Khu vực</td>
                            <td class="style3"> 
                                <div class="left">
                                    <asp:DropDownList ID="ddlKhuVuc" runat="server" 
                                        AutoPostBack="true" Height ="25px" Width="177px" 
                                        onselectedindexchanged="ddlKhuVuc_SelectedIndexChanged1">
                                    </asp:DropDownList>                                    
                                </div>
                            </td>   
                            <td class="crmcell "></td>                         
                        </tr>
                        <tr>    
                            <td class="crmcell right">Mã lô</td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <asp:TextBox ID="txtMaLo" runat="server" Width="165px" MaxLength="20" TabIndex="1" />                                     
                                </div>                              
                                
                            </td>  
                            <td class="crmcell right">Tên lô</td>
                            <td class="crmcell" style="width: 302px">                             
                            <div class="left">

                                    <asp:TextBox ID="txtTenLo" runat="server" Width="165px" MaxLength="100" 
                                        TabIndex="2" />
                                </div>
                                
                            </td>                                                   
                        </tr>
                        <tr>    
                            <td class="crmcell right">Số cây trồng</td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <asp:TextBox ID="txtCayTrong" runat="server" Width="165px" MaxLength="100" Text="0"
                                        TabIndex="3" AutoPostBack="true" ontextchanged="txtCayChoMu_TextChanged" /> &nbsp;cây.</div>
                            </td>
                        </tr>
                        <tr>    
                            <td class="crmcell right">Số cho mũ</td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <asp:TextBox ID="txtCayChoMu" runat="server" Width="165px" MaxLength="100" Text="0"
                                        TabIndex="4" AutoPostBack="true" ontextchanged="txtCayChoMu_TextChanged" /> &nbsp;cây.</div>
                                
                            </td>
                            <td class="crmcell right">Trung bình 1 Ngày</td>
                            <td class="crmcell" style="width: 302px">                             
                            <div class="left">
                                    
                                        <asp:TextBox ID="txtTb1Ngay" runat="server" Width="165px" MaxLength="100" Text="0"
                                        TabIndex="6" />
                                        </div>
                                
                            </td>         
                          
                        </tr>
                       
                        <tr>    
                            <td class="crmcell right">Số không cho mũ</td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <asp:TextBox ID="txtCayKhongChoMu" runat="server" Width="165px" MaxLength="100" Text="0"
                                        TabIndex="5" ReadOnly="true" /> &nbsp;cây.</div>
                                </div>
                                
                            </td>
                            <td class="crmcell right">Trung bình 1 Tháng</td>
                            <td class="crmcell" style="width: 302px">                             
                            <div class="left">
                                    <asp:TextBox ID="txtTb1Thang" runat="server" Width="165px" MaxLength="100" Text="0"
                                        TabIndex="7" />  
                                </div>
                                
                            </td>       

                           
                        </tr>

                        <tr>    
                            <td class="crmcell right">Nhân viên quản lý</td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <asp:DropDownList ID="ddlQuanly" runat="server" 
                                         AutoPostBack="true" Height="25px" Width="177px" TabIndex="8">
                                    </asp:DropDownList>                                    
                                </div>
                            </td>                            
                        </tr>
                        
                        <tr>    
                            <td class="crmcell right"></td>
                            <td class="crmcell" style="width: 244px"> 
                                <div class="left">
                                    <eoscrm:Button ID="btnSave" OnClick="btnSave_Click" runat="server" CssClass="save" Text="" TabIndex="12" />
                                </div>   
                                <div class="left">
                                    <eoscrm:Button ID="btnDelete" runat="server" CssClass="delete"
                                        OnClick="btnDelete_Click" TabIndex="13" />
                                </div>
                                <div class="left">
                                    <eoscrm:Button ID="btnCancel" runat="server" CssClass="button_order" Text="Refresh"
                                        OnClick="btnCancel_Click" TabIndex="13" />
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel> 
    <br />
    <asp:UpdatePanel ID="upnlGrid" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer">
                <eoscrm:Grid ID="gvList" runat="server" UseCustomPager="true" OnRowCommand="gvList_RowCommand" >
                    <PagerSettings FirstPageText="khu vực" PageButtonCount="2" />
                    <Columns>
                        <asp:TemplateField HeaderStyle-CssClass="checkbox">
                            <HeaderTemplate>
                                <input id="chkAllTop" title="Chọn hết / Bỏ chọn hết" name="chkAllTop" type="checkbox"
                                    onclick="CheckAllItems(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="Id" runat="server" type="hidden" value='<%# Eval("MaLo") %>' />
                                <input name="listIds" type="checkbox" value='<%# Eval("MaLo") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mã Lô" HeaderStyle-Width="10%">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkBtnID" runat="server" CommandArgument='<%# Eval("MaLo") %>'
                                    CommandName="EditItem" Text='<%# Eval("MaLo") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Tên Lô" DataField="TenLo" HeaderStyle-Width="28%" />
                        <asp:BoundField HeaderText="Số cây trồng" DataField="SoTrong" HeaderStyle-Width="10%" />
                        <asp:BoundField HeaderText="Số cây cho mũ" DataField="SoChoMu" HeaderStyle-Width="10%" />
                        <asp:BoundField HeaderText="Số cây không cho mũ" DataField="SoKhongChoMu" HeaderStyle-Width="10%" />
                        <asp:BoundField HeaderText="TB Mũ 1Ngày (Kg)" DataField="TBMu1Ngay" HeaderStyle-Width="10%" />
                        <asp:BoundField HeaderText="TB Mũ 1Tháng (Kg)" DataField="TBMu1Thang" HeaderStyle-Width="10%" />

                        
                    </Columns>
                </eoscrm:Grid>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
